const express = require('express')
const router = express.Router()
const db = require('../db/index')


router.post('/login', async (req, res, next) => {

    const result = await db.login.post({ ...req.body })
    res.render('login', {
        data: JSON.stringify({
            ret: true,
            status: result.status,
            info: result.info
        })
    })
})

module.exports = router